[Firefox vs IE] element.offsetTop when parent has overflow and border

Posted by blow on Stack Overflow See other posts from Stack Overflow or by blow
Published on 2010-03-08T15:10:54Z Indexed on 2010/03/08 15:36 UTC
Read the original article Hit count: 349

Filed under:
|

Hi, FF and IE give differents offsetTop when a child is into a parent with overflow and border. FF substracts the top border size of the parent from offsetTop value, so return a negative value(often); I think IE return the correct value instead.

Test it

There is a crossbrowser way to get the same value?

Thank you.

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about offset